<html>
<head>
<title>
Learnings Form
</title>

<script type="text/javascript">

function validate(feedbackform)
{
//var dada = document.getElementById('feedback');
if(feedbackform.learning.value == "")
{
alert("Please enter something to share !!");
return false;
}
return true;
}
</script>

</head>

<?php
$username = $_SESSION['username'];
$con = mysql_connect("localhost","root","");
mysql_select_db("checklist",$con);

$query = "select fullname from employees where username ='$username'";
$result = mysql_query($query);
$data = mysql_fetch_assoc($result);

$fullname = $data['fullname'];
?>

<body bgcolor="#C9C299">

<form method="POST" action="processLearnings.php" onsubmit="return validate(this);">
<table>

<tr>
<td><b>Name :</b>
<td><input type='text' name='fullname' id='fullname' value="<?php echo ''.$fullname; ?>" readonly="readonly"/></td></tr>

</br>

<tr>
<td>
<b>Learning you want to share :</b>
<td><textarea id='learning' name='learning' cols = 18 rows = 5></textarea> </td></tr>

</br>

<tr><td><input type='submit' name='submit' value='submit'/></tr>
</center>

</form>

</body>

</html>
